package com.luke.cloud.order.service.impl;

import com.luke.cloud.order.service.OrderBisService;
import com.luke.cloud.order.service.RemoteOrderService;
import com.luke.cloud.user.service.RemoteUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * @Descrtption OrderBisService
 * @Author luke
 * @Date 2020/4/2
 **/
@Slf4j
@Service
@org.apache.dubbo.config.annotation.Service(interfaceClass = RemoteOrderService.class)
public class OrderBisServiceImpl implements OrderBisService,RemoteOrderService {

    @Reference
    RemoteUserService remoteUserService;

    @Override
    public String bizEcho(String message) {
        log.info("bizEcho:{}",message);
        return remoteUserService.echo(message);
    }

    @Override
    public String echo(String message) {
        log.info("echo:{}",message);
        return "hello,"+message;
    }

}
